<?php
  include("include/conn.php");
  require('include/Smarty/libs/Smarty.class.php');
  
  $partyIdCount = "";
  $partyId      = "";
  $bullionPartyName    = "";
  $msg = "";
  $i = 0;
  $selectQuerybullionPartyName = "SELECT partyId,bullionPartyName 
                             FROM bullionParty
                            ORDER BY bullionPartyName DESC";
  $selectQuerybullionPartyNameResult = mysql_query($selectQuerybullionPartyName);
  $bullionPartyNameRow = mysql_num_rows($selectQuerybullionPartyNameResult);
  if($bullionPartyNameRow > 0)
  {
    while($bullionPartyNameRow = mysql_fetch_array($selectQuerybullionPartyNameResult))
    {
      $partyIdCount                .= $bullionPartyNameRow['partyId'].",";
      $partyId[$i]                  = $bullionPartyNameRow['partyId'];
      $bullionPartyName[$i]         = $bullionPartyNameRow['bullionPartyName'];
      $i++;
    }
  }
  else
  {
    $msg = "<center><div class='clean-gray'>Party Not Found ...!!!</div></center>";
  }
  $smarty = new Smarty;
  require('bottom.php');
  $smarty->assign("l_listParty",$l_listParty);
  $smarty->assign("l_bullionPartyName",$l_bullionPartyName);

  $smarty->assign("i",$i);
  $smarty->assign("msg",$msg);
  $smarty->assign("partyIdCount",$partyIdCount);
  $smarty->assign("partyId",$partyId);
  $smarty->assign("bullionPartyName",$bullionPartyName);
  $smarty->display('bullionPartyList.tpl');
?>
